<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="{$appConfigs[member_title]}">
    <title>{$title}{if $moduletitle}{C 'title_sperator' '-'}{$moduletitle}{/if}{C 'title_sperator' '-'}{$__settings[title]}</title>
    <meta name="keyword" value="{$keyword}">
    <meta name="description" value="{$description}">
    {run $pageName = 'product'}
    {include member.inc.csslink}
</head>
<body>
{include member.inc.header_web}
<main class="max-w product">
    <section class="summary">
        <h4 class="title">筛选</h4>
        <div class="result">
        {if $search_arr[type_name]!=""}
            <a class="crumb a" href="###"><b>类型:</b><em>{$search_arr[type_name]} </em><i class="crumb_c"></i></a>
        {/if}
        {if $search_arr[product_name]!=""}
            <a class="crumb b" href="###"><b>品名:</b><em>{$search_arr[product_name]}</em><i class="crumb_c"></i></a>
        {/if}
        {if $search_arr[repertory_city_name]!=""}
            <a class="crumb c" href="###"><b>交收地:</b><em>{$search_arr[repertory_city_name]}</em><i class="crumb_c"></i></a>
        {/if}
        {if $search_arr[delivery_way]!=""}
            <a class="crumb d" href="###"><b>交收方式:</b><em>{$search_arr[delivery_way_name]}</em><i class="crumb_c"></i></a>
        {/if}
        </div>
        
        <ul class="lists">
            <li>

                <span class="text">类型：</span>
                <div class="cont">
                    <a class="aa" href="javascript:;" data-act='search' data-name="type_name" data-value=""{if $search_arr[type_name]==''}class="active"{/if}>全部</a>
                    {loop $myTPFBArray['typeName'] $k $v}
                    {if $k==0}
                    <a href="javascript:;" data-act='search' data-name="type_name" data-value="{$v}" {if $search_arr[type_name]==$v}class="active"{/if}>{$v}</a>
                    {else}
                    <a href="javascript:;" data-act='search' data-name="type_name" data-value="{$v}" {if $search_arr[type_name]==$v}class="active"{/if}>{$v}</a>
                    {/if}
                    {/loop}

                </div>
            </li>
            <li>
                <span class="text">品名：</span>
                <a href="javascript:;" class="more"> 更多 <i></i></a>
                <div class="cont">
                    <a class="bb" href="javascript:;" data-act='search' data-name="product_name" data-value=""{if $search_arr[product_name]==''}class="active"{/if}>全部</a>

                    {loop $myTPFBArray['productName'] $k $v}
                    {if $k==0}
                    <a href="javascript:;" data-act='search' data-name="product_name" data-value="{$v}" {if $search_arr[product_name]==$v}class="active"{/if}>{$v}</a>
                    {else}
                    <a href="javascript:;" data-act='search' data-name="product_name" data-value="{$v}" {if $search_arr[product_name]==$v}class="active"{/if}>{$v}</a>
                    {/if}
                    {/loop}

                </div>
            </li>
            <li>
                <span class="text">交收地：</span>
                <div class="cont">
                    <a class="cc" href="javascript:;" data-act='search' data-name="repertory_city_name" data-value="" {if $search_arr[repertory_city_name]==''}class="active"{/if}>全国</a>
                    {loop $myTPFBArray['repertoryCityName'] $k $v}
                    {if $k==0}
                    <a href="javascript:;" data-act='search' data-name="repertory_city_name" data-value="{$v}" {if $search_arr[repertory_city_name]==$v}class="active"{/if}>{$v}</a>
                    {else}
                    <a href="javascript:;" data-act='search' data-name="repertory_city_name" data-value="{$v}" {if $search_arr[repertory_city_name]==$v}class="active"{/if}>{$v}</a>
                    {/if}
                    {/loop}
                </div>
            </li>
            <li>
                <span class="text">交收方式：</span>
                <div class="cont">
                    <a class="dd" href="javascript:;" data-act='search' data-name="delivery_way" data-value="" {if $search_arr[delivery_way]==''}class="active"{/if}>全部</a>
                    <a href="javascript:;" data-act='search' data-name="delivery_way" data-value="0" {if $search_arr[delivery_way]=='0'}class="active"{/if}>卖家配送</a>
                    <a href="javascript:;" data-act='search' data-name="delivery_way" data-value="1" {if $search_arr[delivery_way]==1}class="active"{/if}>买家自提</a>
                </div>
            </li>
        </ul>
    </section>
    <section class="pro_list">
        <h4 class="title">商品列表</h4>
        <div class="header">
            <form class="form-inline" id="form" action="index">
                <input type="hidden" name="type_name" value="{$search_arr['type_name']}"/>
                <input type="hidden" name="repertory_city_name" value="{$search_arr['repertory_city_name']}"/>
                <input type="hidden" name="delivery_way" value="{$search_arr['delivery_way']}"/>

                <input type="hidden" name="order_name" value="{$search_arr[order_name]}" class="type"/>
                <input type="hidden" name="order_way" value="{$search_arr[order_way]}" class="type"/>

                <ul class="tab">
                    <li data-ordername="all" class="{if $search_arr[order_name]=='all'}active{/if} {if $search_arr[order_name]=='all'&&$search_arr[order_way]=='desc'}down{/if}">综合</li>
                    <li data-ordername="qty" class="{if $search_arr[order_name]=='qty'}active{/if} {if $search_arr[order_name]=='qty'&&$search_arr[order_way]=='desc'}down{/if}"> 数量<i></i></li>
                    <li data-ordername="price" class="{if $search_arr[order_name]=='price'}active{/if} {if $search_arr[order_name]=='price'&&$search_arr[order_way]=='desc'}down{/if}">价格<i></i></li>
                </ul>
                <input type="text" placeholder="最低价" class="input" name="start_price"
                       value="{$search_arr['start_price']}"/>&nbsp;-&nbsp;&nbsp;
                <input type="text" placeholder="最高价" class="input" name="end_price" value="{$search_arr['end_price']}"/>
                <label>品名</label>
                <input type="text" class="input" name="product_name" value="{$search_arr['product_name']}"/>
                <label>厂家</label>
                <input type="text" class="input" name="factory_name" value="{$search_arr['factory_name']}"/>
                <label>牌号</label>
                <input type="text" class="input" name="brand_name" value="{$search_arr['brand_name']}"/>
                <input type="submit" class="btn-primary btn-sm btn" value="确认"/>

                <div class="pages">
                    {$simplePagemenu}

                </div>
                <input type="hidden" name="page" value="{$search_arr['page']}">
            </form>
        </div>
        <table class="table2">
            <thead>
            <tr>
                <th width="70">类型</th>
                <th width="70">品名</th>
                <th width="80">厂家</th>
                <th width="100">牌号</th>
                <th width="100">价格(元/{$pro_unit})</th>
                <th width="90">数量</th>
                <th width="70">交收地</th>
                <th width="100">交收方式</th>
                <th width="120">最小交易量({$pro_unit})</th>
                <th width="130">操作</th>
            </tr>
            </thead>
            <tbody>
            {loop $items $value}
            <tr data-id="{$value['id']}">
                <td>{$value['type_name']}</td>
                <td>{$value['product_name']}</td>
                <td>{$value['factory_name']}</td>
                <td>{$value['brand_name']}</td>
                <td class="c-danger fw_bold">{$value['sales_price']}</td>
                <td>{$value['quantity']}</td>
                <td>{$value['address']}</td>
                <td>{$value['delivery_way']}</td>
                <td>{$value['min_volume']}</td>
                <td>
                    <a href="javascript:;" class="btn-default btn-sm" data-act="add_car">加购物车</a>
                    <a href="javascript:;" class="btn-primary btn-sm" data-act="buy">立即购买</a>
                </td>
            </tr>
            {/loop}
            </tbody>
        </table>
    </section>
    <div class="text-right">
        {$pagemenu}
    </div>

</main>
{include member.inc.ad_bar_footer}
{include member.inc.footer}
{include member.inc.script_web}
<!--直接购买弹窗模板-->
{include trading.inc.temp_buy}
<script>
    seajs.use('pro', function (pro) {
        pro.username = "{$username}";
        pro.index();
        pro.buy("{$username}");
    });
</script>
{include member.inc.foot_hook}
</body>
</html>
